# -*- coding: UTF-8 -*-
from app import app


class Configure(object):
    """统一读取配置文件的类"""

    @staticmethod
    def get(key, default=None):
        return (
            app.config[key.upper()]
            if key.upper() in app.config and app.config[key.upper()] is not None
            else default
        )

    @staticmethod
    def set(key, value=None):
        app.config[key.upper()] = value
